package cn.lccabc.user.dao;

import cn.lccabc.user.entity.User;
import org.apache.ibatis.annotations.Param;

public interface UserMapper {
    int deleteByPrimaryKey(Long id);

    int insert(User record);

    int insertSelective(User record);

    User selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    /**
     * 根据用户名查询用户
     * @param username
     * @return
     */
    User selectByUsername(String username);

    /**
     * Shiro根据用户名查询用户权限
     * @param username
     * @return
     */
    User selectByUsernameShiro(@Param("username") String username);
}